import axios from '../utils/axios'

//修改用户信息
export function EditUserInfo(params) {
    return axios.post('/cUserprofile/update', params);
}

//登录
export function login(params) {
    return axios.post('/cUser/login', params);
}

//退出登录
export function logout() {
    return axios.post('/user/logout')
}

//注册
export function register(params) {
    return axios.post('/cUser/register', params);
}

//查询余额
export function getUserBalance() {
    return axios.get('/cUserBalance/selectBalance');
}

//获取用户信息
export function getUserInfo() {
    return axios.get('/cUser/my')
}

//获取消费记录 - 分页
export function getCoinRecordForPages() {
    return axios.get('/cUserCoinRecord/selectByExampleAndRowBounds')
}

//新增消费
export function addCoinRecord(params) {
    return axios.post('/cUserCoinRecord/', params)
}